#include "messagetask.h"

void MessageTask::run()
{
    tcpSocket->write(msg->toByteArray());
    auto f = tcpSocket->flush();
    qDebug() << "MessageTask tcpSocket->flush:" << f;
}

MessageTask::~MessageTask()
{
    delete msg;
}

MessageTask::MessageTask(QTcpSocket *tcpSocket, const Message *msg) : tcpSocket(tcpSocket),
    msg(msg)
{}
